class CreateGlobalSettings < ActiveRecord::Migration
  def self.up
    create_table :global_settings do |t|
      t.column :key, :string
      t.column :value, :string, :default=>"", :null=>false
    end
    add_index :global_settings, :key, :unique => true
    GlobalSettings.reset_column_information
    GlobalSettings.new :key => "site_name", :value => "MySite"
  end

  def self.down
    drop_table :global_settings
  end
end
